package org.dromara.business.domain.bo;

import org.dromara.business.domain.Audit;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;

/**
 * 提现审核业务对象 audit
 *
 * @author zlj
 * @date 2024-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Audit.class, reverseConvertGenerate = false)
public class AuditBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long auditId;

    /**
     * 提现金额
     */
    @NotNull(message = "提现金额不能为空", groups = {AddGroup.class, EditGroup.class})
    @DecimalMin(value = "0.01", message = "提现金额必须大于0", groups = {AddGroup.class, EditGroup.class})
    @Digits(message = "提现金额格式不正确", groups = {AddGroup.class, EditGroup.class}, integer = 10, fraction = 2)
    private BigDecimal balance;

    /**
     * 支付宝收款账号
     */
    @NotNull(message = "支付宝收款账号不能为空", groups = {AddGroup.class, EditGroup.class})
    @Length(message = "支付宝收款账号长度不能超过 32", groups = {AddGroup.class, EditGroup.class}, max = 32)
    private String alipay;

    /**
     * 审核状态（0待审核 1已通过 2已拒绝）
     */
    @NotBlank(message = "审核状态（0待审核 1已通过 2已拒绝）不能为空", groups = {EditGroup.class})
    private String status;

    /**
     * 拒绝原因
     */
    private String reason;


}
